package com.shanling.shanlingcontroller.view;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.app.AlertDialog;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.shanling.shanlingcontroller.R;

/**
 * Created by ch1 on 2019/10/11.
 */

public class NoChooseDialog extends Dialog {

    public NoChooseDialog(@NonNull Context context, int themeResId, int texttitle, int texthint, int text, final View.OnClickListener listener) {
        super(context, themeResId);
        LayoutInflater inflater = LayoutInflater.from(context);
        View v = inflater.inflate(R.layout.lost_pattern_dialog, null);
        TextView title=v.findViewById(R.id.tv_title);
        TextView hint=v.findViewById(R.id.tv_hint);
        Button button=v.findViewById(R.id.bt);
        button.setText(text);
        title.setText(texttitle);
        hint.setText(texthint);
        setContentView(v);
        button.setOnClickListener(listener);
        this.getWindow().setGravity(Gravity.CENTER);
        setCancelable(false);
    }
}
